package com.roy.bloom;

import java.util.HashSet;
import java.util.Set;

import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.JedisCluster;
import redis.clients.jedis.JedisPoolConfig;

public class JedisBloomDemo {

	public static void main(String[] args) throws Exception {
		Set<HostAndPort> nodes = new HashSet<>();
		nodes.add(new HostAndPort("172.16.49.39",6379));
		nodes.add(new HostAndPort("172.16.49.40",6379));
		nodes.add(new HostAndPort("172.16.49.41",6379));
		JedisPoolConfig config = new JedisPoolConfig();
        config.setMaxTotal(200);
        config.setMaxIdle(200);
        config.setMinIdle(10);
        config.setMaxWaitMillis(1000);
        
		JedisCluster jedis = new JedisCluster(nodes,
                2000,
                2000,
                8,
                "Redis@ssfk$123SIT",
                config);
		
		String testRes = jedis.get("testKey");
		System.out.println(testRes.length()+";"+testRes);
		jedis.close();
	}
}
